This invention relates to methods and apparatus for performing fill operations within regions of computer memory.
In the field of computing, it is frequently necessary to fill a large number of memory locations with a value. For example, in the field of computer graphics, it is common to fill a region of a frame buffer memory with a default value such as a background color value.
Performance is an issue when executing a fill operation because of the large number of memory locations that must be written during the operation: It is desirable to complete the fill as quickly as possible. One prior art technique that has been employed in this area has been to provide an automatic fill feature in memory controller hardware. The typical manner of using such a feature is for driver software to xe2x80x9cset upxe2x80x9d a fill operation by writing a starting location, a region size/shape, and a fill value into one or more registers of the memory controller hardware. Once the driver software has provided this set-up information, the memory controller hardware may then perform the fill operation for the region of interest autonomously without further involvement by the driver software. While the prior art technique provides some speed enhancement during fill operations, it is desirable to provide an even greater speed enhancement.
In one general aspect, the invention includes a method or apparatus for filling a memory area that represents a rectangle. The rectangle or a first section thereof may be divided into i+j horizontal subsections. The i horizontal subsections may be filled in a first pass using i region fill processors. And the j horizontal subsections may be filled in a second pass using j region fill processors.
In another general aspect, the i subsections may have a first common size, and the j subsections may have a second common size. If so, then the hardware of the region fill processors and the setup of such hardware may be simplified.
In another general aspect, a second section of the rectangle may be filled by dividing the second section into n vertical subsections having equal width, and filling the n vertical subsections using n region fill processors.